/// Replication File
/// Publication Date: July 8, 2025
/// Author: Scott LaCombe
/// Software: Stata 18.0

/// Load Data- CPS First
use cleaned_cps, clear 

reg vote ib4.gen##c.postmat male age hispanic black initiative income  educ std_spending close_gub close_senate competitive_pres covi  i.stateno [pweight=pwsswgt],  cluster(state)


margins gen, dydx(postmat)
margins gen, at(postmat=(0(1)4)) atmeans noestimcheck


// Figure 2

marginsplot, by(gen) ///
    xtitle("Number of Salient Measures") ///
	ytitle("Probability of Voting") ///
    recast(line) ///
    recastci(rarea) ///
    ciopts(color(gs12%40) lcolor(gs12)) ///
    plotopts(lcolor(black)) ///
	title("")
	 

reg vote ib4.gen##c.postmat male age hispanic black initiative income  educ  close_gub close_senate competitive_pres covi  i.stateno [pweight=pwsswgt],  cluster(state)

estimates store m1

reg vote  ib4.gen c.postmat male age hispanic black initiative income  educ close_gub close_senate competitive_pres covi i.stateno [pweight=pwsswgt],  cluster(state) 

estimates store m2 


reg  vote ib4.gen##c.postmat male age hispanic black income  educ close_gub close_senate competitive_pres covi i.stateno [pweight=pwsswgt] if initiative==1, cluster(state)
 estimates store m3
	 
/// logisitic regression models

logit vote ib4.gen##c.postmat male age hispanic black initiative income  educ close_gub close_senate competitive_pres covi  i.stateno [pweight=pwsswgt],  cluster(state)

estimates store m4


logit vote  ib4.gen c.postmat male age hispanic black initiative income  educ close_gub close_senate competitive_pres covi i.stateno [pweight=pwsswgt],  cluster(state) 

estimates store m5


logit vote ib4.gen##c.postmat male age hispanic black income  educ  close_gub close_senate competitive_pres covi i.stateno [pweight=pwsswgt] if initiative==1, cluster(state)
 estimates store m6
//// Table 1
esttab m1 m2 m3 m4 m5 m6,  se label star(* .1 ** .05 *** .01) r2 aic bic b(2) nolz compress ///
 nogaps nobaselevel replace drop(*.stateno)
 
 
 esttab m1 m2 m3 m4 m5 m6 using m1.rtf,  se label star(* .1 ** .05 *** .01) r2 aic bic b(2) nolz compress ///
 nogaps nobaselevel replace drop(*.stateno)
 
  
 //// Now Just for younger generations
 
 
 reg vote c.postmat i.female age hispanic black initiative income  educ close_gub close_senate competitive_pres covi  i.stateno if gen==1 | gen==2 [pweight=pwsswgt],  cluster(state)
 
 estimates store m1
	 
 
reg vote c.postmat##i.female age hispanic black initiative income  educ close_gub close_senate competitive_pres covi  i.stateno if gen==1 | gen==2 [pweight=pwsswgt],  cluster(state)

estimates store m2

 margins female, dydx(postmat)

 margins female, at(postmat=(0(1)4)) atmeans noestimcheck

 /// Figure 3

marginsplot, by(female) ///
    xtitle("Number of Salient Measures") ///
	ytitle("Probability of Voting") ///
    recast(line) ///
    recastci(rarea) ///
    ciopts(color(gs12%40) lcolor(gs12)) ///
    plotopts(lcolor(black)) ///
	title("")
	
	/// Table 4
	
esttab m2 m1,  se label star(* .1 ** .05 *** .01) r2 b(2) nolz compress ///
 nogaps nobaselevel replace drop(*.stateno)
 
esttab m2 m1  using table3.rtf,  se label star(* .1 ** .05 *** .01) r2 b(2) nolz compress ///
 nogaps nobaselevel replace drop(*.stateno)
 
 ///CES data
  
 /// CES analysis- validated voter weights 
 use ces_cleaned, clear 
 
 
label variable validated "Validated Turnout"
reg validated c.postmat male age hispanic black initiative income  educ  close_gub close_senate competitive_pres covi i.stateno if gen<=2 [pweight=weight],  cluster(state)
estimates store m1

reg vote c.postmat male age hispanic black initiative income  educ  close_gub close_senate competitive_pres covi i.stateno if gen<=2 [pweight=weight],  cluster(state)
estimates store m2


reg validated c.postmat male age hispanic black initiative income  educ close_gub close_senate competitive_pres covi i.stateno if gen>=3 [pweight=weight],  cluster(state)

estimates store m3

reg vote c.postmat male age hispanic black initiative income  educ close_gub close_senate competitive_pres covi i.stateno if gen>=3 [pweight=weight],  cluster(state)

estimates store m4
/// Table 3
esttab m1 m2 m3 m4,  se label star(* .1 ** .05 *** .01) r2 b(2) nolz compress ///
 nogaps nobaselevel replace drop(*.stateno)
 
esttab m1 m2 m3 m4 using table3.rtf,  se label star(* .1 ** .05 *** .01) r2 b(2) nolz compress ///
 nogaps nobaselevel replace drop(*.stateno)
 

 //// Appendix CPS Models
 
 use cleaned_cps, clear 

/// Figure 1A in appendix

reg  vote ib4.gen##c.postmat male age hispanic black income  educ std_spending close_gub close_senate competitive_pres covi i.stateno [pweight=pwsswgt] if initiative==1, cluster(state)
 

margins gen, dydx(postmat)

margins gen, at(postmat=(0(1)4)) atmeans noestimcheck
marginsplot, by(gen) ///
    xtitle("Number of Salient Measures") ///
	ytitle("Probability of Voting") ///
    recast(line) ///
    recastci(rarea) ///
    ciopts(color(gs12%40) lcolor(gs12)) ///
    plotopts(lcolor(black)) ///
	title("")
	 
	 
	 
 
 
 /// Figure A2 marijuana
	 
	 logit vote ib4.gen##i.marijuana male age hispanic black initiative income  educ std_spending close_gub close_senate competitive_pres covi  i.stateno [pweight=pwsswgt],  cluster(state)

estimates store m1

 margins gen, at(marijuana=(0(1)1)) atmeans noestimcheck

marginsplot, by(gen) recast(scatter)  ///
    xtitle("Marijuana Measure") ///
	ytitle("Probability of Voting") ///
	title("") 
	
/// Figure A3- Abortion
logit vote ib4.gen##i.abortion male age hispanic black initiative income  educ std_spending close_gub close_senate competitive_pres covi  i.stateno [pweight=pwsswgt],  cluster(state)

estimates store m1

 margins gen, at(abortion=(0(1)1)) atmeans noestimcheck

marginsplot, by(gen) recast(scatter) ///
    xtitle("Abortion Measure") ///
	ytitle("Probability of Voting") ///
	title("") 


	 
	 // other measures
reg vote ib4.gen##c.count male age hispanic black initiative income  educ  close_gub close_senate competitive_pres covi  i.stateno [pweight=pwsswgt],  cluster(state)

estimates store m1
	 
reg vote  ib4.gen c.count male age hispanic black initiative income  educ close_gub close_senate competitive_pres covi i.stateno [pweight=pwsswgt],  cluster(state) 

estimates store m2 


reg  vote ib4.gen##c.count male age hispanic black income  educ  close_gub close_senate competitive_pres covi i.stateno [pweight=pwsswgt] if initiative==1, cluster(state)
 estimates store m3
	 

	
//// Table A1
esttab m1 m2 m3 ,  se label star(* .1 ** .05 *** .01) r2 b(2) nolz compress ///
 nogaps nobaselevel replace drop(*.stateno)
 
 
 esttab m1 m2 m3 using tablea3.rtf,  se label star(* .1 ** .05 *** .01) r2 b(2) nolz compress ///
 nogaps nobaselevel replace drop(*.stateno)
 
 


 
 


 
 